Make dl-snapshot.py avoid dl'ing existing files
authorHans Jørgen Hoel <hansjorg@urkilden.no>
Mon, 18 May 2015 23:27:29 +0000 (01:27 +0200)
committerHans Jørgen Hoel <hansjorg@urkilden.no>
Mon, 18 May 2015 23:27:29 +0000 (01:27 +0200)
commit79cb5b91063182bde3947975a0f16775d80f1149
tree0c66e8661da5985cb6dacc53f9d676f9df775f74
parent3721b634d5ca1de045784d9ec59b5f6ee78cd978
Make dl-snapshot.py avoid dl'ing existing files

Check for existence of file in dl_path before fetching with curl.
If file exists, compare hash with expected.

Also wrap tarfile.open() in contextlib.closing() to support older
python versions (<= 2.6).

This fixes part of #1525.
src/etc/dl-snapshot.py